using System.Text.Json.Serialization;

namespace HMS.Core.DataProtocol;

public class OperationalResult
{
    public const int ERROR = -1;
    public const int SUCCESS = 0;
    public const int FAILURE = 1;

    [JsonPropertyName("status")]
    public int Status { get; set; }

    [JsonPropertyName("message")]
    public string Message { get; set; } = string.Empty;
}

public class OperationalResult<TModel> : OperationalResult
{
    [JsonPropertyName("data")]
    public TModel Data { get; set; } = default!;
}
